﻿using System.Data;

namespace UwaySoft.EsheetServer.DataLayer
{
    public class SqlParameterAdapter<TParameter> : IParameterContainer<TParameter> where TParameter : IDataParameter
    {
        private readonly TParameter _rawParameter;
        
        public SqlParameterAdapter(TParameter parameter)
        {
            _rawParameter = parameter;
        }

        #region IParameterContainer<TParameter> 成员

        public TParameter RawParameter
        {
            get { return _rawParameter; }
        }

        #endregion

        #region IParameter 成员

        public string ParameterName
        {
            get { return _rawParameter.ParameterName; }
        }

        public object Value
        {
            get { return _rawParameter.Value; }
        }

        #endregion
    }
}
